import java.util.concurrent.FutureTask;

/**
 * @author zhu
 * @date 2024-03-19
 */
public class CallableTest {
    public static void main(String[] args) {
        MyCallable myCallable = new MyCallable();

        FutureTask f1 = new FutureTask(myCallable);
        FutureTask f2 = new FutureTask(myCallable);
        FutureTask f3 = new FutureTask(myCallable);

        Thread t1 = new Thread(f1,"红");
        Thread t2 = new Thread(f2,"绿");
        Thread t3 = new Thread(f3,"蓝");

        t1.start();
        t2.start();
        t3.start();
    }
}
